import {push} from 'redux-first-history';
import { useDispatch } from 'react-redux';
function Home(){
    const dispatch = useDispatch();
    //当派发
    return (
        <div>
            <p>Home</p>
            <button onClick={()=>dispatch(push('/counter'))}>跳转到/counter</button>
        </div>
    )
}
export default Home;

/**
 * function push(){
 *   return {type:'@@router/CHANGE_LOCATION',payload:'/counter'};
 * }
 */